Method, device, and computer readable storage medium for managing storage

ABSTRACT

Embodiments of the present disclosure relate to a method, device and computer readable medium for managing storage. The method comprises: in response to obtaining, at a first storage processor, an access request for a storage unit, determining whether the storage unit is currently accessible, the storage unit including at least one storage area. The method further comprises: in response to the storage unit being currently inaccessible, determining whether the first storage processor has an access right to the storage unit. In addition, the method further comprises: in response to the first storage processor having no access right, requesting a second storage processor for the access right, the second storage processor being associated with a mirror storage unit of the storage unit, and the first and second storage processors having exclusive write access rights.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.15/955,055 filed Apr. 17, 2018 entitled “METHOD, DEVICE, AND COMPUTERREADABLE STORAGE MEDIUM FOR MANAGING STORAGE”, which claims benefit ofthe priority of Chinese Patent Application No. CN201710250539.6 filedApr. 17, 2017 entitled “METHOD, APPARATUS, AND COMPUTER READABLE STORAGEMEDIUM FOR STORAGE MANAGEMENT”.

FIELD

Embodiments of the present disclosure generally relate to managingstorage, and specifically to a method and device for allocating anaccess right to a storage unit among a plurality of storage processors.

BACKGROUND

In a dual controller storage system, there are two controllers which arereferred to as storage processors to provide a storage service to ahost. Usually, cache mirroring technology is employed to ensure securityof data in the cache. The principle of the cache mirroring lies inmirroring the data in the caches between two storage processors, that isto say, the data in the caches of the two storage processors are backedup to each other. It is challenging to allocate an access right to thedata in the caches among two or more storage processors to implementunified management of the storage system.

SUMMARY

Embodiments of the present disclosure provide a method, device andcomputer readable medium for managing storage.

In certain embodiments, a method of managing storage includes, inresponse to receiving, at a storage processor, an access request for astorage unit, determining whether the storage unit is currentlyaccessible based on a state of a current accessibility indicator. Themethod further includes determining the state of the currentaccessibility indicator based on a state of an access right indicator,and performing one of accessing the storage unit and avoiding accessingthe storage unit based on the determined state of the currentaccessibility indicator.

In certain arrangements, the state of the access right indicatorcorresponds to a no-access right state, and the method further includesdetermining that the state of the current accessibility indicatorcorresponds to a currently inaccessible state.

In certain arrangements, the method further includes, having determinedthat the state of the current accessibility indicator corresponds to thecurrently inaccessible state, avoiding accessing the storage unit.

In certain arrangements, the state of the access right indicatorcorresponds to a read-access right state. The method further includesdetermining that the state of the current accessibility indicatorcorresponds to one of (i) a currently read-accessible state, and (ii) acurrently inaccessible state.

In certain arrangements, the method further includes, having determinedthat the state of the current accessibility indicator corresponds to thecurrently read-accessible state, determining that a current accessrequest for the storage unit does not exist or at least one ongoingread-access of the storage unit exists.

In certain arrangements, the method further includes, having determinedthat the state of the current accessibility indicator corresponds to thecurrently read-accessible state, read-accessing the storage unit.

In certain arrangements, the method further includes, having determinedthat the state of the current accessibility indicator corresponds to thecurrently inaccessible state, determining that at least one write-accessrequest exists waiting to be executed.

In certain arrangements, the state of the access right indicatorcorresponds to a write-access right state. The method further includesdetermining that the state of the current accessibility indicatorcorresponds to one of (i) a currently write-accessible state, (ii) acurrently read-accessible state, and (iii) a currently inaccessiblestate.

In certain arrangements, the method further includes, having determinedthat the state of the current accessibility indicator corresponds to thecurrently write-accessible state, determining that a current accessrequest for the storage unit does not exist.

In certain arrangements, the method further includes, having determinedthat the state of the current accessibility indicator corresponds to thecurrently write-accessible state, write-accessing the storage unit.

In certain arrangements, the method further includes, having determinedthat the state of the current accessibility indicator corresponds to thecurrently read-accessible state, determining that at least one ongoingread-access of the storage unit exists.

In certain arrangements, the method further includes, having determinedthat the state of the current accessibility indicator corresponds to thecurrently inaccessible state, determining that at least one ongoingwrite-access of the storage unit exists.

In certain arrangements, the method further includes, having determinedthat the state of the current accessibility indicator corresponds to thecurrently inaccessible state, determining that at least one ongoingread-access of the storage unit exists and at least one write-accessrequest exists waiting to be executed.

In certain embodiments, a device for managing storage includes a memory,and a storage processor configured to execute program instructions outof the memory, in response to receiving an access request for a storageunit, to determine whether the storage unit is currently accessiblebased on a state of a current accessibility indicator, to determine thestate of the current accessibility indicator based on a state of anaccess right indicator, and to perform one of accessing the storage unitand avoiding accessing the storage unit based on the determined state ofthe current accessibility indicator.

The Summary of the disclosure is provided to introduce a selection ofconcepts in a simplified form, and they will be further described inDetailed Description of Embodiments below. The Summary of the disclosureis not intended to identify key features or essential features of thepresent disclosure, nor is it intended to limit the scope of the presentdisclosure.

BRIEF DESCRIPTION OF THE DRAWINGS

Through a more detailed description of example embodiments of thepresent disclosure in the accompanying drawings, the above and otheradvantages, features, and objects of the present disclosure will becomemore apparent, in which in the example embodiments of the presentdisclosure, the same reference signs usually denote the same parts.

FIG. 1 illustrates a schematic diagram of an example of a storage system100;

FIG. 2 illustrates a schematic diagram of an example of a cache system200;

FIG. 3 illustrates a schematic diagram of an example of a cache system300 according to an embodiment of the present disclosure;

FIG. 4 illustrates a flow chart of a method 400 of processing dataaccording to an embodiment of the present disclosure;

FIG. 5 illustrates a flow chart of a method 500 of processing dataaccording to an embodiment of the present disclosure;

FIG. 6 illustrates a block diagram of an apparatus 600 for processingdata according to an embodiment of the present disclosure;

FIG. 7 illustrates a block diagram of an apparatus 700 for processingdata according to an embodiment of the present disclosure; and

FIG. 8 illustrates a block diagram of an example device 800 that may beused to implement an embodiment of the content of the presentdisclosure.

In all figures, the same or corresponding reference signs denote thesame or corresponding parts.

DETAILED DESCRIPTION

The disclosure of U.S. patent application Ser. No. 15/955,055 filed Apr.17, 2018 entitled TECHNIQUES FOR MANAGING DATA WHICH IS ACCESSIBLE BYMULTIPLE STORAGE PROCESSORS is hereby incorporated herein by referencein its entirety.

Preferred embodiments of the present disclosure will be described inmore detail below with reference to figures. Although the figures showpreferred embodiments of the present disclosure, it should beappreciated that the present disclosure may be implemented in variousforms and should not be limited by embodiments illustrated here. On thecontrary, these embodiments are provided to enable more thorough andcomplete understanding of the present disclosure, and completely conveythe scope of the present disclosure to those skilled in the art.

As used herein, the term “includes” and its variants are to be read asopen-ended terms that mean “includes, but is not limited to.” The term“or” is to be read as “and/or” unless the context clearly indicatesotherwise. The term “based on” is to be read as “based at least in parton.” The term “one example embodiment” and “an example embodiment” areto be read as “at least one example embodiment.” The term “anotherembodiment” is to be read as “at least one other embodiment.” Terms suchas “first” and “second” may refer to different or identical objects. Thetext below might include other explicit and implicit definitions.

FIG. 1 illustrates a schematic diagram of an example of a storage system100. As shown in FIG. 1, the storage system 100 may include: storageprocessors 110A and 110B (hereinafter collectively referred to asstorage processor 110), a bus 150 and back end device 160 ₁-160 _(N)(hereinafter collectively referred to as back end device 160). Thestorage processor 110 and back end device 160 may be connected via thebus 150. The back end device 160 may be any non-volatile storage mediumcurrently known or to be developed in the future, for example, magneticdisk, solid state disk (SSD), magnetic disk array or the like.

An application may run individually in the storage processors 110A and110B. The storage processors 110A and 110B may be connected to eachother to exchange data to implement cache mirroring. The storageprocessor 110A may include a front end module 120A, a cache module 130Aand a back end module 140A which are connected to each other, and thestorage processor 110B may include a front end module 120B, a cachemodule 130B and a back end module 140B which are connected to eachother.

The front end modules 120A and 120B (hereinafter collectively referredto as front end module 120) may respond to a data transmission requestfrom a front end device (e.g., a host). When the front end device writesdata to the storage system 100, the front end module 120 may receive awrite access request and data to be written from the front end device.In addition, when the front end device reads data from the storagesystem 100, the front end module 120 may send a read acknowledgement andthe requested data to the front end device.

The cache modules 130A and 130B (hereinafter collectively referred to ascache module 130) may improve read/write performance. When the data iswritten into the storage system 100, the data may not be directlywritten into the back end device 160. On the contrary, the data may betemporarily cached in the cache module 130 (e.g., DRAM), and then thestorage system 100 may send a write acknowledgement to the front enddevice. Then, the storage system 100 may flush the data in the cachemodule 130 to the back end device 160 via the back end module 140 atproper time. In addition, when the data is read from the storage system100, the data is previously read from the back end device 160 to thecache module 130 via the back end module 140 so that the storage system100 may return the requested data from the cache module 130.

As stated above, since the storage system 100 includes more than onestorage processor 110 and employs the cache mirroring technology, thedata in the cache module of one storage processor will be mirrored tothe cache module of a peer storage processor in the write operation.

For example, when the data is written into the cache module 130A of thestorage processor 110A, the data will be mirrored to the cache module130B of the storage processor 110B. After the storage processor 110Areceives a response of completion of mirroring from the storageprocessor 110B, the storage processor 110A sends a write acknowledgementto the front end device.

In addition, in the read operation, for example, when data is read fromthe cache module 130A of the storage processor 110A, the storageprocessor 110A determines whether there exists the requested data in thelocal cache module 130A. If there exists, the data is returned from thecache module 130A. If there does not exist, the storage processor 110Adetermines whether there exists the requested data in the cache module130B of the peer storage processor 110B. If the requested data exists inthe cache module 130B, the storage processor 110A mirrors the data inthe cache module 130B to the cache module 130A, and the data is returnedfrom the cache module 130A. In the case that the requested data does notexist in both of the two cache modules 130A and 130B, the storageprocessor 110A uploads the data from the back end device 160, and storesthe data in the cache module 130A, and then the data is returned fromthe cache module 130A.

However, existence of more than one storage processor 110 in the storagesystem 100 might cause the following consequence: if there are more thanone access request to simultaneously access data and the mirror of thedata, consistency of the data of the storage system 100 might beaffected. To avoid this situation, it is necessary to deterniine whetherthe data is currently accessible before accessing the data. FIG. 2illustrates a schematic diagram of an example of the cache system 200for determining whether the data is currently accessible.

As shown in FIG. 2, the cache system 200 may be used as the cachemodules 130A and 130B shown in FIG. 1. The cache module 130A may includeat least one storage unit 210A, and the storage module 130B may includeat least one storage unit 210B (the storage units 210A and 210B arehereinafter collectively referred to as storage unit 210). The storageunit 210 is an example of a management unit of the cache module 130. Asan example, the storage unit 210 may manage 64 KB data.

The cache system 200 may further include at least one access indicator220 corresponding to the storage unit 210. The access indicator 220 mayindicate whether the data is currently accessible. For example, beforethe storage processor 110A accesses the storage unit 210A, the storageprocessor 110A determines whether the storage unit 210A is accessiblevia the access indicator 220. In the case that the storage unit 210A isaccessible, the storage processor 110A accesses the storage unit 210A,and the access indicator 220 is updated to indicate that the storageunit 210 is current inaccessible. In this case, if the peer storageprocessor 110B intends to access the storage unit 210B as the mirror ofthe storage unit 210A, the storage processor 110B determines that thestorage unit 210B is inaccessible via the access indicator 220. Hence,the storage processor 110B's access to the storage unit 210B isrejected.

However, as the access indicator 220 indicates accessibility of thewhole storage unit, accessibility conflicts would be very serious foraccess to small data. A large number of accessibility conflicts wouldsubstantially decrease the input/output performance of the storagesystem 100.

Conventionally, to reduce the accessibility conflicts caused by theaccess to small data, the cache system 200 usually employs Share Writetechnology and Virtual Reference technology.

The principle of the Share Write technology is that the write accessrequest for the storage unit 210 is a Share Write access request. Itpermits more than one write access request to simultaneously write datainto the storage unit and its peer storage unit. A precondition foremploying the Share Write technology lies in that the front end module120 may process the access request, so that there does not exist a reador write access request to a storage unit and its peer storage unitbefore a previous write access request for the storage unit iscompleted.

The principle of the Virtual Reference technology lies in creating acopy of the storage unit 210. For a read access request, if the previousrequest makes the storage unit 210 currently inaccessible, a virtualstorage unit is created and the data of the storage unit 210 is copiedto the virtual storage unit. The subsequent access to the storage unit210 will proceed in the virtual reference unit. For a write accessrequest, if the previous request makes the storage unit 210 currentlyinaccessible, a virtual storage unit is created, and the data is writteninto the virtual storage unit. After the previous request releases thestorage unit 210, the data in the virtual storage unit will be mergedinto the storage unit 210.

However, the above two technologies are disadvantageous. Thedisadvantage of the Share Write technology lies in the potential datacorruption. For example, in the case that the front end module 120intends to simultaneously perform a write access to the storage unit andthe peer storage unit, the data in the storage unit might be mixed bytwo write accesses, and therefore the data is corrupted.

The disadvantage of the Virtual Reference technology lies in theperformance issue. As stated above, in the case that the VirtualReference technology is used, the data is copied to the virtual storageunit or the data is copied from the virtual storage unit. The datacopying will consume central the processing unit (CPU) resource and thememory band width, and reduce the performance of the storage system.

The root cause of the above disadvantages lies in the method ofdetermining whether the data is currently accessible, and the size ofthe data accessed. If there does not exist an accessibility conflict orthere exist very few accessibility conflicts, Share Write technology andVirtual Reference technology will not be needed any more.

To at least partially solve the above issues and one or more of otherpotential issues, example embodiments of the present disclosure proposea solution for processing data. The solution uses a currentaccessibility indicator and an access right indicator for the storageunit, to avoid the serious accessibility conflict and the potential datacorruption. In addition, according to the solution, when the storageprocessor does not have a write access right, the data is written into atemporary storage unit, thereby reducing data copying. Hence, the methodmay be used to allocate the access right to the data in the cache amongtwo or more storage processors, thereby implementing unified managementof the storage system and improving the performance and reliability ofthe storage system.

FIG. 3 illustrates a schematic diagram of an example of a cache system300 according to an embodiment of the present disclosure. It should beappreciated that the structure and function of the storage system 300shown in FIG. 3 are only used for illustration purpose, not to imply anylimitation to the scope of the present disclosure. Embodiments of thepresent disclosure may be reflected in different structures and/orfunctions.

The cache system 300 may be used as the storage modules 130A and 130Bshown in FIG. 1. Like what is shown in FIG. 2, the cache modules 130Aand 130B may include at least one storage unit 210A and 210B,respectively. As stated above, the storage unit 210 may serve as themanagement unit of the cache module 130. Different from FIG. 2, thestorage units 210A and 210B may include at least one storage area330A₁-330A_(N) and 330B₁-330B_(N) (hereinafter collectively referred toas storage area 330), respectively. As an example, the storage unit 210may include 128 storage areas 330. In addition, like the cache modules130A and 130B, the storage units 210A and 210B are mirrored to eachother, and the storage areas 330A₁-330A_(N) and 330B₁-330B_(N) are alsomirrored to each other.

In addition, the storage units 210A and 210B may further include atleast one access right indicator 310A1-310A_(N) and 310B₁-310B_(N)(hereinafter collected referred to as access right indicator 310)corresponding to the at least one storage area 330A₁-330A_(N) and330B₁-330B_(N), respectively, at least one current accessibilityindicator 320A₁-320A_(N) and 320B₁-320B_(N) (hereinafter collectivelyreferred to as current accessibility indicator 320), and at least onetemporary storage area 340A₁-340A_(N) and 340B₁-340B_(N) (hereinaftercollected referred to as temporary storage area 340).

The access right indicator 310 may indicate the local storage processor110's access right to the storage area 330, to allocate the access rightbetween the local and the peer storage processors 110. To ensure dataconsistency, the local and the peer storage processors 110 haveexclusive write access rights. The current accessibility indicator 320may indicate whether the storage area 330 is currently accessible. Thetemporary storage area 340 may be used to temporarily store the data tobe written. Similar to the storage units 210A and 210B, the temporarystorage units 350A and 350B may serve as the management units of thetemporary storage areas 340A₁-340A_(N) and 340B₁-340B_(N). It is notedthat the temporary storage area 340 is created only when the localstorage processor 110 obtains the write access request, but has noaccess right to the storage area 330.

With the access right indicator 310 and the current accessibilityindicator 320, it is unnecessary to allocate and notify the access rightbetween the local and the peer storage processors 110 for each access tothe storage area 330. The local storage processor 110 requests the peerstorage processor 110 for the access right only when the local storageprocessor 110's access right indicator 310 indicates that the localstorage processor 110 does not have the access right to the storage area330 as requested by the obtained access request.

As an example, when the access right indicator 310A indicates that thelocal storage processor 110A does not have the access right to thestorage area 330A as requested by the obtained access request, the localstorage processor 110A may request the peer storage processor 110B forthe access right. After the storage processor 110B obtains the requestfor the access right, the storage processor 110B may change its accessright indicator 310B, and may send the storage processor 110A a responseindicating that the access right is granted.

Types of the access request may include the write access request (alsoreferred to as exclusive access request) and the read access request(also referred to as shared access request). The access right indicator310 may indicate the write access right, the read access right and noaccess right. The current accessibility indicator 320 may indicatecurrently write-accessible, currently read-accessible and currentlyinaccessible.

The value of the current accessibility indicator 320 depends on thevalue of the access right indicator 310 and the type of the ongoingaccess request. In some embodiments, if the access right indicator 310of the local storage processor 110 indicates no access right, thecurrent accessibility indicator 320 of the local storage processor 110may only indicate currently inaccessible.

If the access right indicator 310 of the local storage processor 110indicates the read access right, the current accessibility indicator 320of the local storage processor 110 may indicate currentlyread-accessible or currently inaccessible. Currently read-accessiblemeans that there does not exist an access request for the storage area330 or there exists at least one ongoing read access request. Currentlyinaccessible means that there exists at least one write access requestfor the storage area 330 to wait to be executed.

If the access right indicator 310 of the local storage processor 110indicates the write access right, the current accessibility indicator320 of the local storage processor 110 may indicate currentlywrite-accessible, currently read-accessible or currently inaccessible.Currently write-accessible means that there does not exist an accessrequest. Currently read-accessible means that there exists at least oneongoing read access request. Currently inaccessible means that thereexists one ongoing write access, or there exists at least one ongoingread access request and at least one write access request wait to beexecuted.

An access request usually simultaneously accesses multiple storage areas330, in this case, the access rights may be simultaneously allocated tothe storage areas 330. That is to say, the access rights aresimultaneously allocated to all storage areas 330 for an access request,and there does not exist the case in which the access rights areallocated to a part of the storage areas 330. This may improve theperformance of the storage system, and avoid dead lock resulted in theaccess requests waiting for each other.

In some embodiments, in the case that the storage unit 210 serves as themanagement unit, the storage unit 210 may serve as an allocation unit ofthe access right. For example, as stated above, the storage unit 210 maycomprise 128 storage areas. Since the access right indicator 310 and thecurrent accessibility indicator 320 may respectively indicate threestates, which may be represented by two bits, respectively. Therefore,the access right indicator 310 and the current accessibility indicator320 for one storage unit 210 may be represented by 128*2=256,respectively. In this case, the operation for the access right indicator310 and the current accessibility indicator 320 may be implemented usinga bitmap.

It can be seen from the above description that embodiments of thepresent disclosure can use the current accessibility indicator and theaccess right indicator for the storage areas, to avoid the seriousaccessibility conflict and the potential data corruption. In addition,according to embodiments of the present disclosure, when the localstorage processor does not have the write access right, the data can bewritten into the temporary storage unit, thereby reducing data copying.Hence, according to embodiments of the present disclosure, it isfeasible to allocate the access right to the data in the caches amongtwo or more storage processors, thereby implementing unified managementof the storage system and improving the performance and reliability ofthe storage system.

Embodiments of the present disclosure will be further described inconjunction with a cache system 300 shown in FIG. 3. As stated above, toimplement unified management of the storage system and improve theperformance and reliability of the storage system, embodiments of thepresent disclosure propose using the current accessibility indicator,access right indicator and temporary storage unit for the storage areasto allocate the access right to data in the caches among two or morestorage processors.

FIG. 4 illustrates a flow chart of a method 400 for processing dataaccording to an embodiment of the present disclosure. Without loss ofgenerality, the method 400 is described with respect to the storageprocessor 110A, for example. In addition, the method 400 may furtherinclude additional acts not shown and/or may omit shown acts. The scopeof the present disclosure is not limited in this aspect.

At 405, the storage processor 110A, in response to obtaining the accessrequest for the storage unit 210A, updates the current accessibilityindicator 320A based on the access request. As stated above, the storageunit 210A is a management unit of the storage system, and the actexecuted for the storage unit 210A is executed for the storage area330A.

In some embodiments, the storage processor 110A may update the currentaccessibility indicator 320A based on the access request and the valueof the current accessibility indicator 320A. If the access request isthe write access request, the current accessibility indicator 320A isset as currently inaccessible, no matter whether the currentaccessibility indicator 320A indicates currently write-accessible orcurrently read-accessible. When the current accessibility indicator 320Aindicates currently read-accessible, the purpose of setting the currentaccessibility indicator 320A as currently inaccessible is to preventpossible subsequent read access.

If the access request is the read access request and the currentaccessibility indicator 320A indicates currently write-accessible, thecurrent accessibility indicator 320A is set as currently read-accessibleto indicate the existence of the ongoing read access. In addition, ifthe current accessibility indicator 320A indicates currentlyinaccessible, the access to the storage area 330A is not allowed, andtherefore it is unnecessary to update the current accessibilityindicator 320A.

At 410, the storage processor 110A determines whether the storage area330A is currently accessible. In some embodiments, the storage processor110A determines whether the storage area 330A is currently accessiblevia the current accessibility indicator 320A. When the currentaccessibility indicator 320A indicates currently write-accessible, thewrite access request and the read access request are both permitted.When the current accessibility indicator 320A indicates currentlyread-accessible, the read access request is permitted whereas the writeaccess request is rejected. When the current accessibility indicator320A indicates currently inaccessible, both the write access request andread access request are rejected.

If the storage area 330A is currently inaccessible, at 415 the storageprocessor 110A determines whether the storage processor 110A has theaccess right to the storage area 330A. In some embodiments, the storageprocessor 110A determines whether the storage processor 110A has theaccess right to the storage area 330A via the access right indicator310A. When the access right indicator 310A indicates the write accessright, both the write access right and the read access request arepermitted. When the access right indicator 310A indicates the readaccess right, the read access request is permitted whereas the writeaccess request is rejected. When the access right indicator 310Aindicates the absence of the access right, both the write access requestand the read access request are rejected.

If the storage processor 110A does not have the access right, at 420,the storage processor 110A requests the storage processor 110B for theaccess right. In some embodiments, in the case that the access requestis the write access request, the storage processor 110A further obtainsdata to be written. In this case, the storage processor 110A creates atemporary storage area 340A and writes the data to be written to thetemporary storage area 340A. In addition, the storage processor 110Afurther sends the data to be written to the storage processor 110B.Furthermore, at 425, the storage processor 110A adds the access requestinto a waiting queue to wait to be executed.

At 430, in response to receiving, from the storage processor 110B, aresponse indicating that the access right is granted, the storageprocessor 110A updates the current accessibility indicator 320A and theaccess right indicator 310A based on the response. In some embodiments,the storage processor 110A may set the current accessibility indicator320A and the access right indicator 310A as the access right returned bythe response. For example, when the storage processor 110B returns thewrite access right, the read access right and no access right,respectively, the current accessibility indicator 320A is set ascurrently write-accessible, currently read-accessible and currentlyinaccessible, respectively, and the access right indicator 310A is setas the write access right, the read access right and no access right,respectively. In addition, at 435, the storage processor 110A obtainsfrom the waiting queue a request waiting to be executed. In someembodiments, the storage processor 110A may determine whether therequest waiting to be executed is permitted. If the request ispermitted, the request is executed. Otherwise, the storage processor110A may put the request back to the waiting queue, and obtain asubsequent request waiting to be executed. Returning to 415, if thestorage processor 110A has the access right, at 440, the storageprocessor 110A adds the access request into a waiting queue to wait tobe executed.

Furthermore, returning to 410, if it is determined that the storage area330A is currently accessible, at 445, the storage processor 110Aaccesses the storage area 330A. In some embodiments, in the case thatthe access request is the write access request, the storage processor110A writes the data to be written from the temporary storage area 340Ato the storage area 330A.

Conventionally, the storage processor 110A first requests the storageprocessor 110B for the access right, and after receiving the responseindicating that the access right is granted, sends to the storageprocessor 110B the data to be written for storage area mirroring, andthe storage processor 110A completes the write procedure until thestorage processor 110A receives from the storage processor 110B aresponse of completion of mirroring. However, according to exampleembodiments of the present disclosure, writing the data to be writteninto the temporary storage area 340A may simultaneously implement therequest for the write access right and the storage area mirroring,thereby improving the performance of the storage system.

At 450, in response to the completion of the access to the storage area330A, the storage processor 110A determines whether the access requestis the write access request. If the access request is not the writeaccess request, at 455, the storage processor 110A determines whetherthere exists the read access request for the storage area 330A.

If there does not exist the read access request for the storage area330A currently, at 460, the storage processor 110A updates the currentaccessibility indicator 320A based on the access right indicator 310A.For example, in the case that the access right indicator 310A is thewrite access right, the read access right and no access right,respectively, the current accessibility indicator 320A may be set ascurrently write-accessible, currently read-accessible and currentlyinaccessible, respectively. In addition, at 465, the storage processor110A obtains, from the waiting queue, a request wait to be executed.

Returning to 450, if the access request is the write access request, at470, the storage processor 110A updates the current accessibilityindicator 320A based on the write access request. In some embodiments,the current accessibility indicator 320A is set as the currentlywrite-accessible. In addition, at 475, the storage processor 110Aobtains a request waiting to be executed from the waiting queue.

FIG. 5 illustrates a flow chart of a method 500 for processing dataaccording to an embodiment of the present disclosure. Without loss ofgenerality, the method 500 is described with respect to the storageprocessor 110B, for example. In addition, the method 500 may furtherinclude additional acts not shown and/or may omit shown acts. The scopeof the present disclosure is not limited in this aspect.

At 510, in response to obtaining, at the storage processor 110B, arequest for the access right to the storage unit 210B of the storageprocessor 110B from the storage processor 110A, the storage processor110B determines whether to permit the access right requested by thestorage processor 110A to be granted or not currently. As stated above,the storage unit 201B is the management unit of the storage system, andthe act executed for the storage unit 210B is executed for the storagearea 330B. In some embodiments, in the case that the storage processor110A requests the storage processor 110B for the write access right, thestorage processor 110B further receives the data to be written from thestorage processor 110A. The storage processor 110B creates a temporarystorage area 340B to write the data to be written into the temporarystorage area 340B.

If the requested access right is permitted to be granted, at 520, thestorage processor 110B updates the access right indicator 310B based onthe request. In some embodiments, if the storage processor 110A requeststhe storage processor 110B for the write access right, the storageprocessor 110B sets the access right indicator 310B as no access right.In this case, in some embodiments, the storage processor 110B writes thedata to be written from the temporary storage area 340B into the storagearea 330B. In addition, if the storage processor 110A requests thestorage processor 110B for the read access right, the storage processor110B sets the access right indicator 310B as the read access right.

At 530, the storage processor 110B sends to the storage processor 110A aresponse indicating that the requested access right is granted.Returning to 510, if the grant of the requested access right is notpermitted, the storage processor 110B adds the request into the waitingqueue to wait to be executed.

It can be seen from the above description that embodiments of thepresent disclosure can use the current accessibility indicator and theaccess right indicator for the storage area, to avoid the seriousaccessibility conflict and the potential data corruption. In addition,according to the embodiments of the present disclosure, when the localstorage processor does not have the write access right, the data iswritten into the temporary storage unit, thereby reducing data copying.Hence, according to embodiments of the present disclosure, it isfeasible to allocate the access right to the data in the caches amongtwo or more storage processors, thereby implementing unified managementof the storage system and improving the performance and reliability ofthe storage system.

FIG. 6 illustrates a block diagram of an apparatus 600 for processingdata according to an embodiment of the present disclosure. For example,any of the storage processors 110A and 110B acting as a requesting partyfor processing data as shown in FIG. 1 may be implemented by theapparatus 600. As shown in FIG. 6, the apparatus 600 may include a firstdetermining module 610 configured to, in response to obtaining, at thefirst storage processor, the access request for the storage unit,determine whether the storage unit is currently accessible, the storageunit including at least one storage area. The apparatus 600 may furtherinclude a second determining module 620 configured to, in response tothe storage unit being currently inaccessible, determine whether thefirst storage processor has the access right to the storage unit. Inaddition, the apparatus 600 may further include a requesting module 630configured to, in response to the first storage processor having noaccess right, request the second storage processor for the access right,in which the second storage processor is associated with a mirrorstorage unit of the storage unit, and the first and second storageprocessors have exclusive write access rights.

FIG. 7 illustrates a block diagram of an apparatus 700 for processingdata according to an embodiment of the present disclosure. For example,any of the storage processors 110A and 110B acting as a requested partyfor processing data as shown in FIG. 1 may be implemented by the device700. As shown in FIG. 7, the apparatus 700 may include a thirddetermining module 710 configured to, in response to obtaining, at thefirst storage processor, a request for an access right to a storage unitof the first storage processor from a second storage processor,determine whether to permit the access right requested by the secondstorage processor to be granted or not currently, in which the storageunit includes at least one storage area, the second storage processor isassociated with the mirror storage unit of the storage unit, and thefirst and second storage processors have exclusive write access rights.The apparatus 700 may further include an updating module 720 configuredto, in response to permitting the requested access right to be granted,update the access right indicator based on the request, the access rightindicator indicating an access right of the first storage processor tothe storage unit. In addition, the apparatus 700 may further include asending module 730 configured to send, to the second storage processor,a response indicating that the requested access right is granted.

For the sake of clarity, FIG. 6 and/or FIG. 7 do not show some optionalmodules of the apparatus 600 and/or apparatus 700. However, it should beappreciated that the features described above with reference to FIGS.1-5 are also applicable for the apparatus 600 and/or apparatus 700.Furthermore, the various modules of the apparatus 600 and/or 700 may beeither hardware modules or software modules. For example, in someembodiments, the apparatus 600 and/or 700 may be implemented partiallyor completely by software and/or firmware, e.g., implemented as acomputer program product embodied on a computer readable medium.Alternatively or additionally, the apparatus 600 and/or 700 may beimplemented partially or completely based on hardware, e.g., implementedas an Integrated Circuit (IC), an Application-Specific IntegratedCircuit (ASIC), a System On Chip (SOC), a Field Programmable Gate Array(FPGA), and the like. The scope of the present disclosure is not limitedin this aspect.

FIG. 8 illustrates a schematic block diagram of an example device 800that may be used to implement embodiments of the present disclosure. Forexample, any of the storage processors 110A and 110B as shown in FIG. 1may be implemented by the device 800. For example, the device 800includes a central processing unit (CPU) 810 which is capable ofperforming various proper acts and processes in accordance with acomputer program instruction stored in a read only memory (ROM) 820 or acomputer program instruction loaded from a storage unit 880 to a randomaccess memory (RAM) 830. In the RAM 830, various programs and dataneeded in the operation of the device 800 may also be stored. The CPU810, the ROM 820 and the RAM 830 are connected to one another via a bus840. An input/output (I/O) interface 850 is also connected to the bus840.

The various components in the device 800 are connected to the I/Ointerface 850: an input unit 860 including a keyboard, a mouse, or thelike; an output unit 870, e.g., various displays and loudspeakers; thestorage unit 880 such as a magnetic disk, an optical disk or the like;and a communication unit 890 such as a network card, a modem, a radiocommunication transceiver. The communication unit 890 allows the device800 to exchange information/data with other devices via a computernetwork such as Internet and/or various telecommunication networks.

The above-described methods and processes such as the method 400 and/orthe method 500 may be implemented by the processing unit 810. Forexample, in some embodiments, the method 400 and/or method 500 may beimplemented as a computer software program, which is tangibly includedin a machine-readable medium such as the storage unit 880. In someembodiments, part or all of the computer program may be loaded and/orinstalled on the device 800 via the ROM 820 and/or the communicationunit 890. When the computer program is loaded to the RAM 830 andexecuted by the CPU 810, one or more acts of the above method 400 and/ormethod 500 may be performed.

The present disclosure may be a method, a device, a system, and/or acomputer program product. The computer program product may include acomputer readable storage medium (or media) having stored thereoncomputer readable program instructions for performing aspects of thepresent disclosure.

The computer readable storage medium can be a tangible device that canretain and store instructions for use by an instruction executiondevice. The computer readable storage medium may be, for example, but isnot limited to, an electronic storage device, a magnetic storage device,an optical storage device, an electromagnetic storage device, asemiconductor storage device, or any suitable combination of theforegoing. A non-exhaustive list of more specific examples of thecomputer readable storage medium includes: a portable computer diskette,a hard disk, a random access memory (RAM), a read-only memory (ROM), anerasable programmable read-only memory (EPROM or Flash memory), a staticrandom access memory (SRAM), a portable compact disc read-only memory(CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk,a mechanically encoded device such as punch-cards or raised structuresin a groove having instructions recorded thereon, and any suitablecombination of the foregoing. A computer readable storage medium, asused herein, is not to be construed as being transitory signals per se,such as radio waves or other freely propagating electromagnetic waves,electromagnetic waves propagating through a waveguide or othertransmission media (e.g., light pulses passing through a fiber-opticcable), or electrical signals transmitted through a wire.

Computer readable program instructions described herein can bedownloaded to respective computing/processing devices from a computerreadable storage medium or to an external computer or external storagedevice via a network, for example, the Internet, a local area network, awide area network and/or a wireless network. The network may includecopper transmission cables, optical transmission fibers, wirelesstransmission, routers, firewalls, switches, gateway computers and/oredge servers. A network adapter card or network interface in eachcomputing/processing device receives computer readable programinstructions from the network and forwards the computer readable programinstructions for storage in a computer readable storage medium withinthe respective computing/processing device.

Computer readable program instructions for carrying out operations ofthe present disclosure may be assembler instructions,instruction-set-architecture (ISA) instructions, machine instructions,machine dependent instructions, microcode, firmware instructions,state-setting data, or either source code or object code written in anycombination of one or more programming languages, including an objectoriented programming language such as Java, Smalltalk, C++ or the like,and a conventional procedural programming language, such as the “C”programming language or similar programming language. The computerreadable program instructions may execute entirely on the user'scomputer, partly on the user's computer, as a stand-alone softwarepackage, partly on the user's computer and partly on a remote computeror entirely on the remote computer or server. In the latter scenario,the remote computer may be connected to the user's computer through anytype of network, including a local area network (LAN) or a wide areanetwork (WAN), or the connection may be made to an external computer(for example, through the Internet using an Internet Service Provider).In some embodiments, electronic circuitry including, for example,programmable logic circuitry, field-programmable gate arrays (FPGA), orprogrammable logic arrays (PLA) may execute the computer readableprogram instructions by utilizing state information of the computerreadable program instructions to personalize the electronic circuitry,in order to perform aspects of the present disclosure.

Aspects of the present disclosure are described herein with reference toflowchart illustrations and/or block diagrams of methods, devices(systems), and computer program products according to embodiments of thedisclosure. It will be understood that each block of the flowchartillustrations and/or block diagrams, and combinations of blocks in theflowchart illustrations and/or block diagrams, can be implemented bycomputer readable program instructions.

These computer readable program instructions may be provided to aprocessing unit of a general purpose computer, special purpose computer,or other programmable data processing apparatus to produce a machine,such that the instructions, when executed by the processing unit of thecomputer or other programmable data processing apparatus, create meansfor implementing the functions/acts specified in the flowchart and/orblock diagram block or blocks. These computer readable programinstructions may also be stored in a computer readable storage mediumthat can direct a computer, a programmable data processing apparatus,and/or other devices to function in a particular manner, such that thecomputer readable storage medium having instructions stored thereonincludes an article of manufacture including instructions whichimplement aspects of the functions/acts specified in the flowchartand/or block diagram block or blocks.

The computer readable program instructions may also be loaded onto acomputer, another programmable data processing apparatus, or anotherdevice to cause a series of operational steps to be performed on thecomputer, other programmable apparatus or other device to produce acomputer implemented process, such that the instructions when executedon the computer, other programmable apparatus, or other device performthe functions/acts specified in the flowchart and/or block diagram blockor blocks.

The flowchart and block diagrams in the figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods and computer program products according to variousembodiments of the present disclosure. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof code, which includes one or more executable instructions forimplementing the specified logical function(s). In some alternativeimplementations, the functions noted in the blocks may occur out of theorder noted in the figures. For example, two blocks shown in successionmay, in fact, be executed substantially concurrently, or the blocks maysometimes be executed in the reverse order, depending upon thefunctionality involved. It will also be noted that each block of theblock diagrams and/or flowchart illustrations, and combinations ofblocks in the block diagrams and/or flowchart illustrations, can beimplemented by special purpose hardware-based systems that perform thespecified functions or acts, or combinations of special purpose hardwareand computer instructions.

The descriptions of the various embodiments of the present disclosurehave been presented for purposes of illustration, but are not intendedto be exhaustive or limited to the embodiments disclosed. Manymodifications and variations will be apparent to those of ordinary skillin the art without departing from the scope and spirit of the describedembodiments. The terminology used herein was chosen to best explain theprinciples of the embodiments, the practical application or technicalimprovement over technologies found in the marketplace, or to enableothers of ordinary skill in the art to understand the embodimentsdisclosed herein.

What is claimed is:
 1. A method of managing storage, comprising: inresponse to receiving, at a storage processor, an access request for astorage unit, determining whether the storage unit is currentlyaccessible based on a state of a current accessibility indicator;determining the state of the current accessibility indicator based on astate of an access right indicator; and performing one of accessing thestorage unit and avoiding accessing the storage unit based on thedetermined state of the current accessibility indicator.
 2. The methodof claim 1 wherein the state of the access right indicator correspondsto a no-access right state, and wherein the determining of the state ofthe current accessibility indicator based on the state of the accessright indicator includes determining that the state of the currentaccessibility indicator corresponds to a currently inaccessible state.3. The method of claim 2 wherein the performing of one of accessing thestorage unit and avoiding accessing the storage unit includes, havingdetermined that the state of the current accessibility indicatorcorresponds to the currently inaccessible state, avoiding accessing thestorage unit.
 4. The method of claim 1 wherein the state of the accessright indicator corresponds to a read-access right state, and whereinthe determining of the state of the current accessibility indicatorbased on the state of the access right indicator includes determiningthat the state of the current accessibility indicator corresponds to oneof (i) a currently read-accessible state, and (ii) a currentlyinaccessible state.
 5. The method of claim 4 further comprising: havingdetermined that the state of the current accessibility indicatorcorresponds to the currently read-accessible state, determining that acurrent access request for the storage unit does not exist or at leastone ongoing read-access of the storage unit exists.
 6. The method ofclaim 5 wherein the performing of one of accessing the storage unit andavoiding accessing the storage unit includes, having determined that thestate of the current accessibility indicator corresponds to thecurrently read-accessible state, read-accessing the storage unit.
 7. Themethod of claim 4 further comprising: having determined that the stateof the current accessibility indicator corresponds to the currentlyinaccessible state, determining that at least one write-access requestexists waiting to be executed.
 8. The method of claim 7 wherein theperforming of one of accessing the storage unit and avoiding accessingthe storage unit includes, having determined that the state of thecurrent accessibility indicator corresponds to the currentlyinaccessible state, avoiding accessing the storage unit.
 9. The methodof claim 1 wherein the state of the access right indicator correspondsto a write-access right state, and wherein the determining of the stateof the current accessibility indicator based on the state of the accessright indicator includes determining that the state of the currentaccessibility indicator corresponds to one of (i) a currentlywrite-accessible state, (ii) a currently read-accessible state, and(iii) a currently inaccessible state.
 10. The method of claim 9 furthercomprising: having determined that the state of the currentaccessibility indicator corresponds to the currently write-accessiblestate, determining that a current access request for the storage unitdoes not exist.
 11. The method of claim 10 wherein the performing of oneof accessing the storage unit and avoiding accessing the storage unitincludes, having determined that the state of the current accessibilityindicator corresponds to the currently write-accessible state,write-accessing the storage unit.
 12. The method of claim 9 furthercomprising: having determined that the state of the currentaccessibility indicator corresponds to the currently read-accessiblestate, determining that at least one ongoing read-access of the storageunit exists.
 13. The method of claim 12 wherein the performing of one ofaccessing the storage unit and avoiding accessing the storage unitincludes, having determined that the state of the current accessibilityindicator corresponds to the currently read-accessible state,read-accessing the storage unit.
 14. The method of claim 9 furthercomprising: having determined that the state of the currentaccessibility indicator corresponds to the currently inaccessible state,determining that at least one ongoing write-access of the storage unitexists.
 15. The method of claim 14 wherein the performing of one ofaccessing the storage unit and avoiding accessing the storage unitincludes, having determined that the state of the current accessibilityindicator corresponds to the currently inaccessible state, avoidingaccessing the storage unit.
 16. The method of claim 9 furthercomprising: having determined that the state of the currentaccessibility indicator corresponds to the currently inaccessible state,determining that at least one ongoing read-access of the storage unitexists and at least one write-access request exists waiting to beexecuted.
 17. The method of claim 16 wherein the performing of one ofaccessing the storage unit and avoiding accessing the storage unitincludes, having determined that the state of the current accessibilityindicator corresponds to the currently inaccessible state, avoidingaccessing the storage unit.
 18. A device for managing storage,comprising: a memory; and a storage processor configured to executeprogram instructions out of the memory to: in response to receiving anaccess request for a storage unit, determine whether the storage unit iscurrently accessible based on a state of a current accessibilityindicator; determine the state of the current accessibility indicatorbased on a state of an access right indicator; and perform one ofaccessing the storage unit and avoiding accessing the storage unit basedon the determined state of the current accessibility indicator.
 19. Thedevice of claim 18 wherein the state of the access right indicatorcorresponds to a no-access right state, and wherein the storageprocessor is further configured to execute the program instructions outof the memory to: determine that the state of the current accessibilityindicator corresponds to a currently inaccessible state; and havingdetermined that the state of the current accessibility indicatorcorresponds to the currently inaccessible state, avoid accessing thestorage unit.
 20. A computer program product including a set ofnon-transitory, computer-readable media having program instructionsthat, when executed by a storage processor, cause the storage processorto perform a method comprising: in response to receiving an accessrequest for a storage unit, determining whether the storage unit iscurrently accessible based on a state of a current accessibilityindicator; determining the state of the current accessibility indicatorbased on a state of an access right indicator; and performing one ofaccessing the storage unit and avoiding accessing the storage unit basedon the determined state of the current accessibility indicator.